﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using GroundWater.Data;
using GroundWater.BusinessActions;

using MonitoringTable = GroundWater.Data.MonitoringDataSet.MonitoringDataTable;
using MonitoringRow = GroundWater.Data.MonitoringDataSet.MonitoringRow;

using WellTable = GroundWater.Data.InfoDataSet.WellsDataTable;
using WellRow = GroundWater.Data.InfoDataSet.WellsRow;



namespace GroundWater
{
    public partial class map : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {

                WellTable wells = Well.GetAll(false, true);

                if (wells == null || wells.Count == 0)
                {
                    RegisterClientScript("alert('还没有水井信息，请先输入');", lblJavaScript);
                }
            }
        }

        protected void ImageMap1_Click(object sender, ImageMapEventArgs e)
        {
           
            switch (e.PostBackValue)
            {
                case "1": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000001"); break;
                case "2": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000002"); break;
                case "3": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000003"); break;
                case "4": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000004"); break;
                case "5": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000005"); break;
                case "6": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000006"); break;
                case "7": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000007"); break;
                case "8": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000008"); break;
                case "9": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000009"); break;
                case "10": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000010"); break;

                case "11": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000011"); break;
                case "12": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000012"); break;
                case "13": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000013"); break;
                case "14": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000014"); break;
                case "15": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000015"); break;
                case "16": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000016"); break;
                case "17": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000017"); break;
                case "18": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000018"); break;
                case "19": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000019"); break;
                case "20": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000020"); break;

                case "21": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000021"); break;
                case "22": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000022"); break;
                case "23": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000023"); break;
                case "24": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000024"); break;
                case "25": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000025"); break;
                case "26": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000026"); break;
                case "27": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000027"); break;
                case "28": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000028"); break;
                case "29": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000029"); break;
                case "30": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000030"); break;

                case "31": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000031"); break;
                case "32": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000032"); break;
                case "33": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000033"); break;
                case "34": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000034"); break;
                case "35": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000035"); break;
                case "36": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000036"); break;
                case "37": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000037"); break;
                case "38": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000038"); break;
                case "39": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000039"); break;
                case "40": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000040"); break;

                case "41": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000041"); break;
                case "42": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000042"); break;
                case "43": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000043"); break;
                case "44": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000044"); break;
                case "45": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000045"); break;
                case "46": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000046"); break;
                case "47": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000047"); break;
                case "48": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000048"); break;
                case "49": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000049"); break;
                case "50": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000050"); break;

                case "51": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000051"); break;
                case "52": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000052"); break;
                case "53": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000053"); break;
                case "54": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000054"); break;
                case "55": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000055"); break;
                case "56": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000056"); break;
                case "57": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000057"); break;
                case "58": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000058"); break;
                case "59": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000059"); break;
                case "60": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000060"); break;

                case "61": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000061"); break;
                case "62": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000062"); break;
                case "63": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000063"); break;
                case "64": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000064"); break;
                case "65": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000065"); break;
                case "66": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000066"); break;
                case "67": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000067"); break;
                case "68": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000068"); break;
                case "69": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000069"); break;
                case "70": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000070"); break;

                case "71": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000071"); break;
                case "72": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000072"); break;
                case "73": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000073"); break;
                case "74": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000074"); break;
                case "75": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000075"); break;
                case "76": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000076"); break;
                case "77": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000077"); break;
                case "78": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000078"); break;
                case "79": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000079"); break;
                case "80": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000080"); break;

                case "81": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000081"); break;
                case "82": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000082"); break;
                case "83": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000083"); break;
                case "84": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000084"); break;
                case "85": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000085"); break;
                case "86": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000086"); break;
                case "87": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000087"); break;
                case "88": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000088"); break;
                case "89": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000089"); break;
                case "90": Response.Redirect("waterlevel/WaterLevelByDate.aspx?id=" + "000000000090"); break;

            }
       }
          
    }

}
